Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger added. #66

Merged
merged 5 commits into from
May 18, 2023
Merged

Logger added. #66

merged 5 commits into from
May 18, 2023

Conversation

ElecTwix
Copy link
Contributor

Logger Added.
It was on TODO I wanted to complete it.

@phughk
Copy link
Contributor

phughk commented May 12, 2023

Can we please use https://github.com/sirupsen/logrus instead? It has levels and already has all the functionality we need. Thanks for adding this though!

@ElecTwix
Copy link
Contributor Author

Can we please use https://github.com/sirupsen/logrus instead? It has levels and already has all the functionality we need. Thanks for adding this though!

I'm not sure about it, it says "Logrus is in maintenance-mode".
If still we want that I will happily implement just wanted to point it out.

@phughk
Copy link
Contributor

phughk commented May 12, 2023

I have used it in the past, but actually you are right. We should pick one of

Zerolog seems to be an improvement on zap, and apex seems to be an integration on top of logging libraries. In that case I think we should use zerolog. What do you think?

unit tests added.
@ElecTwix
Copy link
Contributor Author

Zerolog seems to be an improvement on zap, and apex seems to be an integration on top of logging libraries. In that case I think we should use zerolog. What do you think?

Yeah, I agree I added zerolog implementation and some unit tests.

Copy link
Contributor

@phughk phughk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Some comments about errors and statefulnes

db_test.go Show resolved Hide resolved
pkg/gorilla/gorilla.go Show resolved Hide resolved
pkg/logger/logger_test.go Outdated Show resolved Hide resolved
*.log added to .gitignore
rawlogger func added for raw io.writer
Copy link
Contributor

@phughk phughk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Left some comments

pkg/logger/logger_test.go Outdated Show resolved Hide resolved
pkg/gorilla/gorilla.go Outdated Show resolved Hide resolved
channels added
pkg/gorilla/gorilla.go Show resolved Hide resolved
@phughk phughk merged commit 3bb7ce4 into surrealdb:main May 18, 2023
3 checks passed
@ElecTwix ElecTwix mentioned this pull request May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants